package com.vogue.supplymall.order.domain.dao.impl;

import com.vogue.supplymall.order.domain.dao.OrderItemDao;
import com.vogue.supplymall.order.domain.mapper.OrderItemMapper;
import com.vogue.supplymall.order.domain.model.OrderItem;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * The type Order item dao.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-01-10
 */
@Repository("orderItemDao")
public class OrderItemDaoImpl extends BaseDaoImpl<OrderItem, Long> implements OrderItemDao {
    @Resource
    private OrderItemMapper orderItemMapper;

    @Override
    public Long getOrderItemCount(Long orderId,Class cls) {
        String where = " where orderid =  " + orderId + " and disabledflag = 0";
        return orderItemMapper.selectWhrCount(where, cls);
    }
}
